﻿using System.Data.Common;
using System.Data.Entity;

namespace com.nm.interfaces
{
    public interface IDbContext
    {
        /// <summary>
        /// 数据库事务
        /// </summary>
        DbTransaction DbTransaction { get; }

        /// <summary>
        /// 数据库连接
        /// </summary>
        DbContext Context { get; }

        /// <summary>
        /// 提交事务
        /// </summary>
        void Commit();

        /// <summary>
        /// 回滚事务
        /// </summary>
        void Rollback();
    }
}